/**
* 版权所有：福建邮科电信业务部厦门研发中心 
*====================================================
* 文件名称: ZBSGCFilePath.Clazz
* 修订记录：
* No    日期				作者(操作:具体内容)
* 1.    2013-4-1			詹保山(创建:创建文件)
*====================================================
* 类描述：(说明未实现或其它不应生成Clazzdoc的内容)
* 
*/
package com.devframe.gc.meta;

import com.devframe.gc.core.ZBSGCConstants;
import com.devframe.gc.core.ZBSGCContainer;

public class ZBSGCFileInfoMeta extends ZBSGCInfoMeta{

	private String pagePath;
	private static String JavaSuffix=".java";
	
	
	private String actionClazzName;
	
	private String actionPackage;
///////////////////////////////////////////////////////
	private String servicePackage;
	
	private String serviceClazzName;
	
	private String serviceClazzFullName;
	
	private String serviceInstanceName;
	
///////////////////////////////////////////////////////
	private String serviceImplPackage;
	
	private String serviceImplClazzName;
	
	private String serviceImplClazzFullName;

////////////////////////DAO/////////////////////////////////
	
	private String daoPackage;
	private String daoClazzName;
	private String daoClazzFullName;
	private String daoInstanceName;
	
	private String daoImplPackage;
	private String daoImplClazzName;
	private String daoImplClazzFullName;
	
	
	
	
	
	public ZBSGCFileInfoMeta(ZBSGCBeanInfoMeta beanMeta){
		super(beanMeta);
		this.pagePath=ZBSGCContainer.get(ZBSGCConstants.PAGE_DIR_KEY)+ZBSGCConstants.BACKSLASH+super.getBeanMeta().getFolderName()+ZBSGCConstants.BACKSLASH+this.getBeanMeta().getEntityName();
		this.actionPackage=ZBSGCContainer.get(ZBSGCConstants.PACKAGE_ROOT_KEY)+".action."+beanMeta.getFolderName();
		this.actionClazzName=super.getBeanMeta().getClazzName()+"Action";
		////////////////////////////////////////////////////////////////
		this.servicePackage=ZBSGCContainer.get(ZBSGCConstants.PACKAGE_ROOT_KEY)+".service."+beanMeta.getFolderName();
		this.serviceClazzName=super.getBeanMeta().getClazzName()+"Service";
		this.serviceClazzFullName=this.servicePackage+"."+this.serviceClazzName;
		this.serviceInstanceName=beanMeta.getEntityName()+"Service";
		
		////////////////////////////////////////////////////////////////
		this.serviceImplPackage=ZBSGCContainer.get(ZBSGCConstants.PACKAGE_ROOT_KEY)+".service."+beanMeta.getFolderName()+".impl";
		this.serviceImplClazzName=super.getBeanMeta().getClazzName()+"ServiceImpl";		
		this.serviceImplClazzFullName=this.serviceImplPackage+"."+serviceImplClazzName;
/////////////////////////////////////////////////////////////////////////////////////////
		this.daoPackage=ZBSGCContainer.get(ZBSGCConstants.PACKAGE_ROOT_KEY)+".dao."+beanMeta.getFolderName();
		this.daoClazzName=super.getBeanMeta().getClazzName()+"Dao";
		this.daoClazzFullName=this.daoPackage+"."+this.daoClazzName;
		this.daoInstanceName=beanMeta.getEntityName()+"Dao";
		
		////////////////////////////////////////////////////////////////
		this.daoImplPackage=ZBSGCContainer.get(ZBSGCConstants.PACKAGE_ROOT_KEY)+".dao."+beanMeta.getFolderName()+".impl";
		this.daoImplClazzName=super.getBeanMeta().getClazzName()+"DaoImpl";		
		this.daoImplClazzFullName=this.daoImplPackage+"."+daoImplClazzName;
		
	}


	public String getPagePath() {
		return pagePath;
	}
//JSP 相关配置
	public String getCreatePagePath(){
		return this.pagePath+ZBSGCConstants.BACKSLASH+super.getBeanMeta().getEntityName()+"CreatePage.jsp";
	}
	
	public String getUpdatePagePath(){
		return this.pagePath+ZBSGCConstants.BACKSLASH+super.getBeanMeta().getEntityName()+"UpdatePage.jsp";
	}
	
	public String getViewPagePath(){
		return this.pagePath+ZBSGCConstants.BACKSLASH+super.getBeanMeta().getEntityName()+"ViewPage.jsp";
	}
	public String getListPagePath(){
		return this.pagePath+ZBSGCConstants.BACKSLASH+super.getBeanMeta().getEntityName()+"List.jsp";
	}
	
//action 相关
	public String getActionPackage(){
		return this.actionPackage;
	}
	public String getActionPath(){
		return ZBSGCContainer.get(ZBSGCConstants.PACKAGE_DIR_KEY)+ZBSGCConstants.BACKSLASH+this.actionPackage.replaceAll("\\.", ZBSGCConstants.BACKSLASH)+ZBSGCConstants.BACKSLASH+this.actionClazzName+JavaSuffix;
	}

	public String getActionClazzName() {
		return actionClazzName;
	}
////////////////////////////////////////////
	//service相关

	public String getServicePackage() {
		return servicePackage;
	}
	public String getServiceClazzName() {
		return serviceClazzName;
	}
	public String getServiceClazzFullName() {
		return serviceClazzFullName;
	}
	public String getServiceInstanceName() {
		return serviceInstanceName;
	}
	
	//获取Service接口的路径
	public String getServicePath(){
		return ZBSGCContainer.get(ZBSGCConstants.PACKAGE_DIR_KEY)+ZBSGCConstants.BACKSLASH+this.serviceClazzFullName.replaceAll("\\.", ZBSGCConstants.BACKSLASH)+JavaSuffix;
	}
	
	public String getServiceImplPackage() {
		return serviceImplPackage;
	}
	public String getServiceImplClazzName() {
		return serviceImplClazzName;
	}
	public String getServiceImplClazzFullName() {
		return serviceImplClazzFullName;
	}
	
	public String getServiceImplPath(){
		return ZBSGCContainer.get(ZBSGCConstants.PACKAGE_DIR_KEY)+ZBSGCConstants.BACKSLASH+this.serviceImplClazzFullName.replaceAll("\\.", ZBSGCConstants.BACKSLASH)+JavaSuffix;
	}


	public String getDaoPackage() {
		return daoPackage;
	}


	public String getDaoClazzName() {
		return daoClazzName;
	}


	public String getDaoClazzFullName() {
		return daoClazzFullName;
	}


	public String getDaoInstanceName() {
		return daoInstanceName;
	}
	/**
	 *获取dao路径
	 * @return
	 * @author:詹保山
	 */
	public String getDaoPath(){
		return ZBSGCContainer.get(ZBSGCConstants.PACKAGE_DIR_KEY)+ZBSGCConstants.BACKSLASH+this.daoClazzFullName.replaceAll("\\.", ZBSGCConstants.BACKSLASH)+JavaSuffix;
	}


	public String getDaoImplPackage() {
		return daoImplPackage;
	}


	public String getDaoImplClazzName() {
		return daoImplClazzName;
	}


	public String getDaoImplClazzFullName() {
		return daoImplClazzFullName;
	}
	public String getDaoImplPath(){
		return ZBSGCContainer.get(ZBSGCConstants.PACKAGE_DIR_KEY)+ZBSGCConstants.BACKSLASH+this.daoImplClazzFullName.replaceAll("\\.", ZBSGCConstants.BACKSLASH)+JavaSuffix;
	}

	
 
	
}
